<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<title>发货</title>
	<meta name="renderer" content="webkit">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
	<meta name="apple-mobile-web-app-status-bar-style" content="black">
	<meta name="apple-mobile-web-app-capable" content="yes">
	<meta name="format-detection" content="telephone=no">
	<link rel="stylesheet" href="/${BasePath}/static/layui/css/layui.css" media="all" />
	<link rel="stylesheet" href="/${BasePath}/static/css/public.css" media="all" type="text/css">
</head>
<body class="childrenBody">
<form id="infoForm" class="layui-form" lay-filter="example">
<input type="hidden" name="id" id="id" value="${order.id!''}">

<div style="padding: 20px; background-color: #F2F2F2;">
  <div class="layui-row layui-col-space15">
    <div class="layui-col-md6">
      <div class="layui-card">
        <div class="layui-card-header">订单信息</div>
        <div class="layui-card-body">
                                     订单编号:${order.orderNum!''}
        </div>
      </div>
    </div>
    <div class="layui-col-md6">
      <div class="layui-card">
        <div class="layui-card-header">填写物流信息</div>
        <div class="layui-card-body">
			<div class="layui-form-item">
			  <label class="layui-form-label">快递公司:</label>
			  <div class="layui-input-block">
			      <select name="courierCom" lay-filter="required">
                        ${FreemarkUtil.getOption("wlCompany","")}
			      </select>			  
    		</div>
			</div>
			<div class="layui-form-item">
			  <label class="layui-form-label">快递单号:</label>
			  <div class="layui-input-block">
			    <input type="text" value="" id="courierNumber" name="courierNumber" placeholder="请输入快递单号" lay-verify="required" class="layui-input">
			  </div>
			</div>
        </div>
      </div>
    </div>
  </div>
</div> 
	<div class="proDetail paddingLeft">
		<a class="layui-btn" lay-submit lay-filter="form">确定</a>
	</div>
</form>

<script src="/${BasePath}/static/layui/layui.js" charset="utf-8" type="text/javascript"></script>
<script type="text/javascript" src="/${BasePath}/static/js/common/jquery-2.1.0.min.js"></script>
    <script type="text/javascript">
    layui.use(['form'], function() {
        var form = layui.form,
            layer = layui.layer

            form.on('submit(form)', function() {
                $.ajax({
                    cache: true,
                    type: "POST",
                    url: "/${BasePath}/order/saveCourierNumber",
                    data: $('#infoForm').serialize(),
                    async: false,
                    error: function(request) {
                        layer.msg('系统错误！');
                    },
                    success: function(data) {
                        if(data.code == "1") {
                        	  layer.alert(data.msg, {
                        		    skin: 'layui-layer-lan'
                        		    ,closeBtn: 0
                        		    ,anim: 4 //动画类型
                        		  }, function(){
                        		
                                	  var index = parent.layer.getFrameIndex(window.name);
                                	  parent.layer.close(index);                        			  
                        		  });
 
                        } else {
                            layer.msg(data.msg);
                        }
                    }
                });
            })     

    });
    </script>
</body>
</html>